#include <stdio.h>
#define N 100
void CharRemove(char *p,char ch)
{
    int j;
    for(;(*p)!='\0';p++)
    {
        if((*p)==ch)
        {
            for(j=0;*(p+j)!='\0';j++)
            {
                *(p+j)=*(p+j+1);
            }
            p--;
        }
    }
}
void main()
{
    char str[N];
    char ch;
    printf("please input a string:\n");
    gets(str);
    printf("please input which character you want to remove:");
    ch=getchar();
    CharRemove(str,ch);
    printf("the result of the string after removing:\n");
    puts(str);
}

